<template>
	<div class="parent">
		<child1 @postMsg="getMsg"></child1>
		<hr />
		<child2 :user="datauser"></child2>
		<div>你好</div>
	</div>
</template>

<script>
	import child1 from '@/components/Child1.vue'
	import child2 from '@/components/Child2.vue'
	export default{
		data(){
			return {
				datauser:{username:'zhangsan',age:18}
			}
		},
		components:{
			child1,child2
		},
		methods:{
			getMsg:function(){
				alert(data1);
			}
		}
	}
</script>

<style>
</style>